/*
 * @Author: yangzonglong
 * @Date: 2020-05-18 10:39:51
 * @version: v1.0.0
 * @Descripttion: 
 * @LastEditors: yangzonglong
 * @LastEditTime: 2020-08-11 09:58:44
 * @Auditor: 
 */ 
const { createProxyMiddleware } = require('http-proxy-middleware');
const package = require('./../package.json');

module.exports = function(app) {
  if(package.proxy) {
    app.use(createProxyMiddleware('/bk',
      {
        target: package.proxy,
        changeOrigin: true
      })
    )
  }
};